{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "source": [
    "# pry-doc\n",
    "\n",
    "* irubyが動いている階層でbundle installしないとpry-docは使えない？"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "# frozen_string_literal: true\n",
      "source \"https://rubygems.org\"\n",
      "\n",
      "gem \"rbczmq\"\n",
      "gem \"pry\"\n",
      "gem \"pry-doc\"\n",
      "gem \"iruby\"\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "### Gemfileにpry-docが含まれていることを確認\n",
    "cat /Users/ftakao2007/jupyter/Gemfile"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Using bond 0.5.1\n",
      "Using coderay 1.1.1\n",
      "Using data_uri 0.1.0\n",
      "Using mimemagic 0.3.2\n",
      "Using multi_json 1.12.1\n",
      "Using method_source 0.8.2\n",
      "Using slop 3.6.0\n",
      "Using yard 0.9.9\n",
      "Using rbczmq 1.7.9\n",
      "Using bundler 1.13.7\n",
      "Using iruby 0.3\n",
      "Using pry 0.10.4\n",
      "Using pry-doc 0.10.0\n",
      "Bundle complete! 4 Gemfile dependencies, 13 gems now installed.\n",
      "Bundled gems are installed into ./vendor/bundle.\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "### インストール\n",
    "bundle install --path vendor/bundle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "bigdecimal (1.2.8)\n",
      "bond (0.5.1)\n",
      "coderay (1.1.1)\n",
      "data_uri (0.1.0)\n",
      "io-console (0.4.5)\n",
      "iruby (0.3)\n",
      "json (1.8.3)\n",
      "method_source (0.8.2)\n",
      "mimemagic (0.3.2)\n",
      "multi_json (1.12.1)\n",
      "pry (0.10.4)\n",
      "pry-doc (0.10.0)\n",
      "psych (2.0.17)\n",
      "rbczmq (1.7.9)\n",
      "rdoc (4.2.1)\n",
      "slop (3.6.0)\n",
      "yard (0.9.9)\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "### 確認\n",
    "bundle exec gem list"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ruby-ldap\n",
    "\n",
    "* irubyが動いている階層とは別でも問題無さそう\n",
    "* Jupyter上からだと対象の階層に移動してbundle installができなさそうなのでターミナルから別途実行する必要がありそう"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "# frozen_string_literal: true\n",
      "source \"https://rubygems.org\"\n",
      "\n",
      "# gem \"rails\"\n",
      "\n",
      "gem 'ruby-ldap', '~> 0.9.11'\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "### Gemfileにruby-ldapが含まれていることを確認\n",
    "cat Gemfile"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/Users/ftakao2007/work/python/jupyter_notebook/Ruby\n",
      "pwdで階層はRubyのディレクトリ内に見えるが実際はirubyの設定があるjupyterのトップディレクトリでbundle installが実行される\n",
      "Using bond 0.5.1\n",
      "Using coderay 1.1.1\n",
      "Using data_uri 0.1.0\n",
      "Using mimemagic 0.3.2\n",
      "Using multi_json 1.12.1\n",
      "Using method_source 0.8.2\n",
      "Using slop 3.6.0\n",
      "Using yard 0.9.9\n",
      "Using rbczmq 1.7.9\n",
      "Using bundler 1.13.7\n",
      "Using iruby 0.3\n",
      "Using pry 0.10.4\n",
      "Using pry-doc 0.10.0\n",
      "Bundle complete! 4 Gemfile dependencies, 13 gems now installed.\n",
      "Bundled gems are installed into ./vendor/bundle.\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "### インストール\n",
    "pwd\n",
    "cd /Users/ftakao2007/work/python/jupyter_notebook/Ruby\n",
    "echo \"pwdで階層はRubyのディレクトリ内に見えるが実際はirubyの設定があるjupyterのトップディレクトリでbundle installが実行される\"\n",
    "bundle install --path vendor/bundle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "bigdecimal (1.2.8)\n",
      "bond (0.5.1)\n",
      "coderay (1.1.1)\n",
      "data_uri (0.1.0)\n",
      "io-console (0.4.5)\n",
      "iruby (0.3)\n",
      "json (1.8.3)\n",
      "method_source (0.8.2)\n",
      "mimemagic (0.3.2)\n",
      "multi_json (1.12.1)\n",
      "pry (0.10.4)\n",
      "pry-doc (0.10.0)\n",
      "psych (2.0.17)\n",
      "rbczmq (1.7.9)\n",
      "rdoc (4.2.1)\n",
      "slop (3.6.0)\n",
      "yard (0.9.9)\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "### 確認\n",
    "bundle exec gem list"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
